import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 新增债券信息
  addSecucategory: (query) => api.post(`${config.interfaces.type5}instrument-server/bondissuerinfo/saveBond`, query),
  // 根据Id编辑债券信息
  editSecucategoryById: (query) => api.post(`${config.interfaces.type5}instrument-server/bondissuerinfo/updateBond`, query),
  // 获取债券发行信息表格数据
  queryBondInformation: (query) => api.get(`${config.interfaces.type5}instrument-server/bondissuerinfo/findAll`, query),
  // 获取虚拟标的证券代码名称
  getStock: (query) => api.get(`${config.interfaces.type5}portfolio-server/portfolioTrial/getVirtualSubjectCode`, query),
  // 还有不是当天虚拟标的的查询 点击试算按钮的接口  /portfolioTrial/virtualSubjectTrial?id=
  virtualSubjectTrial: (query) => api.get(`${config.interfaces.type5}portfolio-server/portfolioTrial/virtualSubjectTrial`, query),
  // 保存虚拟标的
  saveVirtualSubject: (query) => api.post(`${config.interfaces.type5}portfolio-server/portfolioTrial/saveVirtualSubject`, query),
  // 删除债券发行信息
  deleteAccountById: (query) => api.get(`${config.interfaces.type5}instrument-server/bondissuerinfo/deleteById`, query),
  // 上市转换
  changeSecucode: (query) => api.post(`${config.interfaces.type1}bondTrade/changeSecucode`, query),
  // 查询发行数据
  queryBondIssuerInfoDetail: (query) => api.get(`${config.interfaces.type5}instrument-server/bond/bondIssuerInfoDetail`, query),
  // 查询基础信息
  queryBondBasicInfoDetail: (query) => api.get(`${config.interfaces.type3}bondInfo/bondBasicInfoDetail/`, query),
};
